package controller;

import entity.Linkman;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import service.LinkmanService;

import java.util.List;

@Controller
@RequestMapping("/linkman")
public class LinkmanController {
    @Autowired
    private LinkmanService linkmanService;
    @RequestMapping("/track")
    public String track(ModelMap modelMap) {
        List<Linkman> linkman = linkmanService.selectAll();
        modelMap.addAttribute("linkman",linkman);
        return "track.jsp";
    }
}
